package com.test;

import com.baselib.BaseSupport;

import freemarker.template.*;

public class Login extends BaseSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String username;
	private String password;
	private Configuration cfg;
	private User user = new User();
	
	public void out(String s){
		System.out.println(s);
	}
	
	public void setUsername(String u){
		out(u);
		username = u;
	}
	public String getUsername(){
		out("Get:"+this.username);
		return username;
	}
	public void setPassword(String p){
		out(p);
		password = p;
	}
	public String getPassword(){
		out("GET:"+this.password);
		return password;
	}
	public User getUser(){
		out("GET User"+user.getUserId());
		return this.user;
	}
	public String execute ()throws Exception{
		user.setUserId("1000");
		user.setUserName("Name in user");
		return SUCCESS;
	}
}
class User {
	private String userId;
	private String userName;
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}

}
class Users{
	private String userId;
	private String userName;
	
	public void setUserId(String id){
		this.userId = id;
	}
	public String getUserId(){
		return this.userId;
	}
	public void setUserName(String n){
		userName = n;
	}
	public String getUserName(){
		return userName;
	}
}
